
interface State{
  userInfo:User,
  hasToken:boolean
}
interface User{
  username:string,
  realname:string,
  avatar:string,
  status:string,
  id:number
}
const state:State = {
  userInfo:{
    username:"",
  realname:"",
  avatar:"",
  status:"",
  id:0
  },
  hasToken:false
}
const getters ={

}
const mutations = {
  changeUserInfo(state:State,payload:User):void{
    state.userInfo = payload
  },
  changeLoginStatus(state:State,payload:boolean):void{
    state.hasToken = payload
  }
}

export default{
  namespaced:true,
  state,
  getters,
  mutations
}